package com.zfei.gfb.api.domain;

import java.util.LinkedHashSet;
import java.util.Set;

/**
 * 事件级别
 *
 * @author fgh
 */
public class EventTier {

    /**
     * 1-99 根事件
     */
    public static final int ROOT_EVENT = 0;

    /**
     * 动态
     */
    public static final int POST = 1;

    /**
     * 100-10000 子事件，可以分为N层，常用两层
     * 101-199 分配给具体第1层子事件
     * 201-299 分配给具体第2层子事件
     */
    public static final int SUB_EVENT = 100;

    /**
     * 评论
     */
    public static final int COMMENT = 101;

    /**
     *  菜地认领
     */
    public static final int CLAIM = 102;
    /**
     * 房源收藏
     */
    public static final int COLLECT = 103;

    /**
     * 评论的评论
     */
    public static final int COMMENT_2 = 201;

    /**
     * 房屋浏览
     */
    public static final int BROWSE = 301;

    /**
     * 星币转账
     */
    public static final int TRANSFER = 302;

    /**
     * 创作者帖子审核
     */
    public static final int CREATOR_AUDIT = 401;

    /**
     * 关注
     */
    public static final int FOLLOW = 501;

    public static final Set<Integer> ALL = new LinkedHashSet<>();

    public static final Set<Integer> POSTS = new LinkedHashSet<>();

    public static final Set<Integer> COMMENTS = new LinkedHashSet<>();

    public static final Set<Integer> CLAIMS = new LinkedHashSet<>();

    public static final Set<Integer> COLLECTORS = new LinkedHashSet<>();

    public static final Set<Integer> PARENTS = new LinkedHashSet<>();

    public static final Set<Integer> BROWSES = new LinkedHashSet<>();

    public static final Set<Integer> FOLLOWS = new LinkedHashSet<>();


    static {
        ALL.add(POST);
        ALL.add(COMMENT);
        ALL.add(CLAIM);
        ALL.add(COMMENT_2);
        ALL.add(TRANSFER);
        ALL.add(FOLLOW);
        ALL.add(COLLECT);

        POSTS.add(POST);

        COMMENTS.add(COMMENT);
        COMMENTS.add(COMMENT_2);

        CLAIMS.add(CLAIM);
        COLLECTORS.add(COLLECT);

        PARENTS.addAll(POSTS);
        PARENTS.addAll(COMMENTS);

        BROWSES.add(BROWSE);
        BROWSES.add(TRANSFER);

        FOLLOWS.add(FOLLOW);
    }
}
